Forbid unnecessary type assertions#933
Conversation
b926eb6 to
8d4c196
Compare
|
Integration tests report: appsharing.space |
| }, | ||
| plugins: ["@typescript-eslint", "import"], | ||
| rules: { | ||
| "@typescript-eslint/ban-ts-comment": "warn", |
There was a problem hiding this comment.
Just satisfying my compulsive need to alphabetize here :)
There was a problem hiding this comment.
What is the idea with warning rules?
There was a problem hiding this comment.
I think these are things that the team isn't fully committed to enforcing (yet). I'd like to upgrade them to errors, but I think we haven't have the time to fix the problems identified by the rule (yet). Perhaps we have a @ts-ignore we don't know how to eliminate (yet)?
stefanv
left a comment
There was a problem hiding this comment.
This LGTM!
I do notice that the eslint config is outdated. I just updated another project to 9, so if you are interested I can give the new flat config layout a shot.
|
Thanks for the review!!
Love it, that'd be wonderful! I've been avoiding that pain for some time :) |
* Forbid unnecessary type assertions * Autofix lint errors and format
Description
Keep our codebase a little more readable by removing unnecessary type assertions. Those type assertions may mislead readers to believe that a value is incorrectly typed (or potentially undefined) when it is not. It's easy to introduce unnecessary type assertions during development as we tighten up our type information.
Checklist
Resolves #XXX.Failing lint checks can be resolved with:
pre-commit run --all-filesjlpm run lint📚 Documentation preview: https://jupytergis--933.org.readthedocs.build/en/933/
💡 JupyterLite preview: https://jupytergis--933.org.readthedocs.build/en/933/lite